package model;

import java.util.ArrayList;

/**
 * Agent abstraction;
 * every agent has to implement those methods
 */
public abstract class AbstractAgent {
	
	
	public int x;
	public int y;
	
	public boolean goalReached = false;
	public Action.ActionType currAction;
	public ArrayList<Action.ActionType> actionList;
	
	
	
	public AbstractAgent(){
		currAction=null;
		actionList = new ArrayList<Action.ActionType>();
	}
	
	public AbstractAgent(int x, int y){
		this.x = x;
		this.y = y;
		//currAction = Action.Type.NOOP;
		currAction=null;
		actionList = new ArrayList<Action.ActionType>();
	}
	
	/**
	 * @return true if the agent has reached the goal
	 */
	public abstract boolean goalReached();
	

	/**
	 * Move the agent according with the visibility
	 */
	public abstract void update();
	
	/**
	 * Print the performed actions by the agent
	 */
	public abstract void showActions();

	/** 
	 * Perform an action
	 * @return the action the agent wants to perform
	 */
	public abstract Action.ActionType action();

}
